package p;

public class UserThread implements Runnable{
    Account aco;
    int money;//要取多少钱

    public UserThread() {
    }

    public UserThread(Account aco, int money) {//通过构造方法将要取钱的数量和要取钱的账户传进来
        this.aco = aco;
        this.money = money;
    }

    @Override
    public void run() {
        //取钱
       this.aco.withdraw(money);
    }
}
